<?php include 'header.php' ?>
    <div id="dialog" title="Xác nhận">
        <p> Bạn chắc chắn muốn xóa?</p>
        <button onclick="deleteNews();">Có</button>
        <button onclick="closeDialog()">Không</button>
    </div>

    <article>
        <div class="clear"/>
        <section class="list-content">
            <div class="giohang">Quản lý tin tức</div>
            <div id="news_form" style="text-align: left;margin-left: 100px;">
                <p id="message"></p>

                <form id="newsForm">
                    <div>
                        <input type="hidden" id="id_news">
                        <table>
                            <tr>
                                <td><label for="name">Tựa đề: </label></td>
                                <td><input type="text" id="name" name="name" maxlength="200"
                                           placeholder="tựa đề" required="true" autofocus="true" size="50"></td>
                            </tr>
                            <tr>
                                <td><label for="short_desc">Trích dẫn: </label></td>
                                <td><textarea id="short_desc" name="short_desc" cols="39"></textarea></td>
                            </tr>

                            <tr>
                                <td><label for="image_url">Ảnh bìa: </label></td>
                                <td><input type="text" id="image_url" name="image_url" placeholder="chọn ảnh bìa"
                                           value="../images/default.jpg" size="50" disabled="disabled">
                                    <input type="button" value="Chọn file" onclick="browserImage();"/></td>
                            </tr>

                            <tr>
                                <td colspan="2"><label for="description">Nội dung: </label></td>
                            </tr>
                            <tr>
                                <td colspan="2"><textarea id="description" name="description" class="ckeditor">
                                    </textarea></td>
                            </tr>
                            <tr>
                                <td colspan="2"><input type="submit" value="Lưu lại" onclick="createNews();return false;"
                                           style="width: 100px"></td>
                            </tr>
                        </table>
                </form>
                <br/>

                <div class="clear"/>
            </div>
        </section>

        <section class="list-content">
            <div id="news_list">
            </div>
            <div class="clear"/>
        </section>

    </article>

<?php include 'footer.php' ?>